
package com.be.beadmin.project.service;

import com.be.beadmin.common.entity.PageEntity;
import com.be.beadmin.project.dto.input.FileInfoDto;
import com.be.beadmin.project.dto.input.InfoAndPage;
import com.be.beadmin.project.dto.output.FileInfoEx;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;

/**
* @description 服务接口
* @author zmy
* @date 2023-02-15
**/
public interface FileInfoService {

    /**
    * 分页的查询接口
    * @param pageEntity
    * @return
    */
    Page<FileInfoEx> getFileInfoByPage(PageEntity pageEntity);

    /**
    * @param fileInfoDto
    */
    void addFileInfo(FileInfoDto fileInfoDto);

    /**
    * @param fileInfoDto
    */
    void updateFileInfo(FileInfoDto fileInfoDto);

    /**
    * @param id
    */
    void delFileInfo(String id);

    /**
    * 删除多个角色
    * @param ids
    */
    void delFileInfos (List<String> ids);

    List<String> getFileType();

    void uploadFileInfo (String infoId, String category, MultipartFile[] multipartFile,String fileName ,String memo,String bucketName) throws Exception;
//
    void updateFileInfo2 (String id, String infoId, String category, MultipartFile multipartFile, String memo,String bucketName) throws Exception;

    InputStream download(String bucketName, String id, HttpServletResponse response);

    /**
     * 指定项目ID获取附件分页信息
     * @param infoAndPage
     * @return
     */
    Page<FileInfoEx> getFileInfoByPageAndInfoId(InfoAndPage infoAndPage);
}